# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm

import openpyxl

wb = openpyxl.load_workbook('demo.xlsx')

# 激活sheet
sheet = wb.active

# 设置表名
sheet.title = '课表'

# 添加数据
sheet.append(['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'])
sheet.append(['java', 'C++', 'C', 'python', 'html&css'])
sheet.append(['chinese', 'math', 'english', 'P.E', 'biology'])
sheet.append(['politics', 'history', 'geography', 'physics', 'chemistry'])

# 保存数据
wb.save('blog.xlsx')
